import { createRouter,  createWebHistory} from 'vue-router'

import Login from '../views/login.vue'
import Index from '../views/index.vue'

const routes = [
  {
    path: '/login',
    name:'Login',
    components: {
        login:Login
    }
  },
  {
    path: '/',
    name: '/',
    components: {
        home:Index
    },children: [{
        path: '/Notfoud',
        name: 'Notfoud',
        component :import('../views/Notfoud.vue')
      },{
        path: '/log',
        name: 'Log',
        component: () => import('../views/log.vue')
      }, {
        path: '/actor',
        name: 'Actor',
        component: () => import('../views/actor.vue')
      },{
        path: '/home',
        name: 'Home',
        component :import('../views/About.vue')
      },
      {
        path: '/about',
        name: 'About',
        component: () => import('../views/About.vue')
      },
      {
        path: '/form',
        name: 'Form',
        component: () => import('../views/Form.vue')
      },
      {
        path: '/table',
        name: 'Table',
        component: () => import('../views/Table.vue')
      },
      {
        path: '/page',
        name: 'Page',
        component: () => import('../views/pagination.vue')
      },
      {
        path: '/dep',
        name: 'Dep',
        component: () => import('../views/department.vue')
      },
      {
        path: '/quanxian',
        name: 'Quanxian',
        component: () => import('../views/quanxian.vue')
      },
      {
        path: '/user',
        name: 'User',
        component: () => import('../views/user.vue')
      }]
   }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
